/*
 * fingerprint_cache.h
 *
 *  Created on: Mar 24, 2014
 *      Author: fumin
 */

#ifndef FINGERPRINT_CACHE_H_
#define FINGERPRINT_CACHE_H_

void init_fingerprint_cache();
void init_chunkpointer_cache();
int64_t fingerprint_cache_lookup(fingerprint *fp);
int64_t delta_fingerprint_cache_lookup(struct chunk *c);
void fingerprint_cache_prefetch(int64_t id);
void chunkpointer_cache_prefetch(int64_t id);
void free_fingerprint_cache();
struct chunkPointer *chunkpointer_cache_lookup(struct chunk *c);
struct index_item *match_cache_lookup(struct chunk *c);
int match_adjacent(struct segment *s, struct chunk *lastChunk, struct chunk *nowChunk,
                   GSequenceIter *last_iter, GSequenceIter *now_iter, int last_index, int now_index);
int match_last_adjacent(struct segment *s, struct chunk *lastChunk,
                        GSequenceIter *last_iter, int index);
int simiulated_fingerprint_cache_lookup(struct super_feature_item *c1, struct super_feature_item *c2, struct super_feature_item *c3);
#endif /* FINGERPRINT_CACHE_H_ */
